package comp3021.a1;

import java.io.PrintWriter;

public class Log extends Configuration{
	PrintWriter writer;
	public Log(){};
	public Log(String fileName){
		try
		{
		writer = new PrintWriter(fileName);		//try to generate 
		}
		catch(Exception WriterError)  
		{
		System.out.println("Cannot write on logbook");
		}	
	}

	public void error(String message)
	{
		System.out.println("<Log> "+ message);
	}	
	public void errorRecord(String message)
	{
		writer.println(message);
		writer.flush();
	}
	void record(String message)
	{
		writer.println(message);
		writer.flush();
	}
}
